@extends('admin.layouts.base')
@section('title','产品详情')
@section('pageHeader','产品详情')

@section('content')
    <style>
        td span {
            line-height: 50px;
        }
    </style>
    <div class="row">
        <div class="col-lg-12">
            {{--提示信息弹出框--}}
            @include('admin.partials.errors')
            @include('admin.partials.success')
            {{--提示信息弹出框--}}

            {{--基本信息 开始--}}
            <div class="box box-success">
                <div class="box-header">
                    <h1 class="box-title">基本信息</h1>
                </div>
                <div class="box-body">
                    <table class="table table-striped">
                        <thead></thead>
                        <tbody>
                        <tr>
                            <td width="20%">产品LOGO</td>
                            <td>
                                <span>
                                    @if($data->product_logo)
                                        <img width="100" src="{{ $data->product_logo }}" alt="产品LOGO">
                                    @else
                                        <span>未上传</span>
                                    @endif
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>产品名称</span></td>
                            <td colspan="3">
                                <span>
                                    {{ $data->name }}
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>产品简介</span></td>
                            <td colspan="3">
                                <span>
                                    {{ $data->product_introduction }}
                                </span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            {{--基本信息 结束--}}





            {{--额度信息 开始--}}
            <div class="box box-success">
                <div class="box-header">
                    <h1 class="box-title">额度信息</h1>
                </div>
                <div class="box-body">
                    <table class="table table-striped">
                        <thead></thead>
                        <tbody>
                        <tr>
                            <td width="20%"><span>额度</span></td>
                            <td>
                                <span>
                                    {{ $data->minimum_amount }}元 —
                                    {{ $data->maximum_amount }}元
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>周期</span></td>
                            <td>
                                <span>
                                    {{ $data->min_cycle }}{{ \App\Models\Orm\Product::getCycleTypeText($data->interest_algorithm) }}
                                    —
                                    {{ $data->max_cycle }}{{ \App\Models\Orm\Product::getCycleTypeText($data->interest_algorithm) }}
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>利率</span></td>
                            <td>
                                <span>
                                    {{ $data->min_algorithm }}% —
                                    {{ $data->max_algorithm }}%
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>利息算法</span></td>
                            <td>
                                <span>{{ \App\Models\Orm\Product::getInterestAlgorithmText($data->interest_algorithm) }}</span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>提前还款</span></td>
                            <td>
                                <span>{{ \App\Models\Orm\Product::getPrepaymentText($data->prepayment) }}</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            {{--额度信息 结束--}}


            <div class="box box-success">
                <div class="box-header">
                    <h1 class="box-title">速配信息</h1>
                </div>
                <div class="box-body">
                    <table class="table table-striped">
                        <thead></thead>
                        <tbody>
                        <tr>
                            <td width="20%"><span>主体人群</span></td>
                            <td>
                                <span>
                                    {{ $data->crowd }}
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span>官方放款时间</span></td>
                            <td>
                                <span>
                                    {{ $data->fastest }}
                                    {{ \App\Models\Orm\Product::getFastestTypeText($data->fastest_type) }}
                                </span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            {{--速配信息 结束--}}
        </div>
    </div>
@endsection